package com.tiantian.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tiantian.dao.TaskinfobasecommissionRepositroy;
import com.tiantian.datajpa.service.impl.GenericServiceImpl;
import com.tiantian.domain.Taskinfobasecommission;
import com.tiantian.service.TaskinfobasecommissionService;

@Service
public class TaskinfobasecommissionServiceImpl extends GenericServiceImpl<Taskinfobasecommission, String> implements TaskinfobasecommissionService {
	private TaskinfobasecommissionRepositroy repositroy;

	@Autowired
	public void setTaskinfobasecommissionRepositroy(TaskinfobasecommissionRepositroy repositroy) {
		super.setGenericDAO(repositroy);
		this.repositroy = repositroy;
	}

	public List<Taskinfobasecommission> findByTaskId(String taskId) {
		String sql = "select * from TaskInfoBaseCommission t where t.taskId=:taskId";
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("taskId", taskId);
		return repositroy.queryListBySql(sql, params, Taskinfobasecommission.class);
	}

}
